/**
 * @projectName CollegeEmploymentNetwork
 * @package com.kzj.CollegeEmploymentNetwork.shiro.controller
 * @className com.kzj.CollegeEmploymentNetwork.shiro.controller.LogoutController
 * @copyright Copyright 2025 Thunisoft, Inc All rights reserved.
 */
package com.kzj.CollegeEmploymentNetwork.shiro.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * LogoutController
 * @description
 * @author KZJ
 * @date 2025/1/24 20:23
 * @version TODO
 */
@Controller
@RequestMapping("/logout")
public class LogoutController {
    @PostMapping
    public void logout(){
        Subject user = SecurityUtils.getSubject();
        user.logout();
    }
}